<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
${aier_doctype}
<html <s:property value="aier-html-xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="${aier_content_type}" />
<meta name="keywords" content="${aier_keyworks}" />
<meta name="description" content="${aier_description}" />
<title>${aier_title}</title>
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}ui.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="stylesheet" href="${aier_css_url}jp/msg.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/reset.css" />
<link rel="stylesheet" href="${aier_css_url}social/classes/common.css" />
<link rel="stylesheet" href="${aier_css_url}social/classes/cmanage.css" />


<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}${aier_jqui_js}ui.js"></script>
<script type="text/javascript" src="${aier_js_url}97/WdatePicker.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/msg.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/cn.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/jq.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/ja.js"></script>
<script type="text/javascript" src="${aier_js_url}jc/cj.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
<script type="text/javascript">
	var global_suffix = "${aier_suffix}", global_url = "${aier_url}", global_uri = "${aier_uri}", global_urijs = "${aier_urijs}", 
	 global_sid = "${sid}",global_cid = "${cid}",global_userin_url = "${video_user_in_url}",global_userout_url = "${video_user_out_url}"; 
</script>
</head>
<!-- 班级管理-学生进出园记录 -->
<body>
	<!-- 顶栏 -->
	<s:action name="userhomecomm_homeHead" namespace="/user"
		executeResult="true"></s:action>

	<!-- 正文 -->
	<div id="hfContent" class="ar-content">
		<div class="content-main">
			<!-- 班级名称栏 -->
			<s:action name="ccomm_classesMTitle" namespace="/classes"
				executeResult="true"></s:action>
			<div class="main-content wrap-bg clearfix">
				<!-- 左侧栏 -->
				<s:action name="ccomm_classesMLeft" namespace="/classes"
					executeResult="true"></s:action>
				<!-- 右侧内容 -->
				<div class="ae-right">
					<div class="right-main">
						<div class="right-main-top">
							<div class="binfo-title">
								<span>学生打卡记录</span>
							</div>
							<div class="right-line"></div>
						</div>
						<div class="right-main-c">
							<div class="info-tab01">
								<table>
									<tr>
										<th class="gray6">时间：</th>
										<td><input type="text" id="dayValue" class="PY-input"
                                            onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd',readOnly:true,maxDate:'%y-%M-%d'})" />
                                        </td>
										<td colspan="2" align="right"><a id="b_hmsel"
                                            onclick="show_stu_record()" href="javascript:;"
                                            class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only fr"
                                            role="button" aria-disabled="false"><span
                                                class="ui-button-text">查询</span> </a></td>
									</tr>
								</table>
							</div>
						</div>

						<div class="right-main-down">
							<div class="down-line"></div>

							<div class="down-inre">
								<table id="inOutParkInfo"></table>
								<div id="inOutParkPage"></div>
							</div>
						</div>
					</div>
				</div>
			</div>

		</div>
		<!-- footer copyright -->
		<s:action name="userhomecomm_homeFooter" namespace="/user"
			executeResult="true"></s:action>
		<!-- /footer copyright -->
	</div>


</body>
<script type="text/javascript">

	//学生打卡记录
	$(document).ready(function(){
		var d=new Date();
	    $('#dayValue').val(d.getFullYear() + "-" + appendZero(d.getMonth() + 1) + "-" + appendZero(d.getDate()));
	    var dayValue = $('#dayValue').val();
	    $("#inOutParkInfo").jqGrid({
	        url:global_url+global_urijs+'classessinoutpark_searchSIccardList'+global_suffix+"?cid="+global_cid+"&dayValue="+dayValue,                
	        datatype:"json",                
	        mtype:'GET', 
	        height:'360',
	        width:'660',
	        colNames:['学生姓名','上午进园','上午出园','下午进园','下午出园'],                
	        colModel:[                    
	        {name:'name',index:'name',width:100,align:'center', sortable:false},                    
	        {name:'am_in',index:'am_in',width:100,align:'center', sortable:false},
	        {name:'am_out',index:'am_out',width:100,align:'center', sortable:false},
	        {name:'pm_in',index:'pm_in',width:100,align:'center', sortable:false},
	        {name:'pm_out',index:'pm_out',width:100,align:'center', sortable:false}
	        ],
	        //autowidth:true,
	        jsonReader: {
	            root:"stuIcardList",
	            page: "page",
	            total: "page_count",
	            records : "count",
	            repeatitems: false
	        },
	        pager: jQuery('#inOutParkPage'),
	        prmNames : {page:"page",sort: "sort"},
	        rowNum: 10,
	        //rowList: [10, 20, 30],
	        sortname: 'ctime_str',
	        hidegrid: false,
	        sortorder: 'desc',
	        viewrecords: true,
	        caption: '学生打卡记录',
	        gridComplete:function(){
	        }
	    }).navGrid("#inOutParkPage", { edit: false, add: false, del: false, search: false });
	
	});
	//补0函数
	function appendZero(s){
	    return ("00"+ s).substr((s+"").length);
	}  

	function show_stu_record(){
		var dayValue = $('#dayValue').val();
		jQuery("#inOutParkInfo")
				.jqGrid(
						'setGridParam',
						{
							url : "${aier_url}${aier_urijs}classessinoutpark_searchSIccardList${aier_suffix}?"
									+ "cid="+global_cid
									+ "&dayValue="
									+ dayValue,
							page : 1
						}).trigger("reloadGrid");
	}
</script>
</html>